package com.webchat.domain.vo.response.mall;


import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class MallCategoryResponseVO {

    private Long id;

    private Long parentId;

    private String name;

    private Integer sort;

    private int level;

    /**
     * 分类子节点
     */
    private List<MallCategoryResponseVO> children;

    private MallCategoryResponseVO parent;


    public List<MallCategoryResponseVO> getChildren() {
        if (children == null) {
            this.children = new ArrayList<>();
            return children;
        }
        return children;
    }
}
